home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / tpldir.com / TPLDIR.DOC next >
Encoding:
Text File  |  1990-01-23  |  2.3 KB  |  46 lines

  1. TPLDIR.PAS                        12:24:51 AM  Jan 23, 1990
  2.  
  3. An example program showing a TpDir-style file pick list with
  4. multiple file selection capability
  5.  
  6. Copyright January 1990 -- Ken Henderson
  7.  
  8. Recently a Compuserve user wanted a version of TpDir or a modification
  9. of it to support the selection of multiple files.  My response was that
  10. it would not be too difficult, but that TpPick would have to be called
  11. directly, as opposed to indirectly through TpDir.
  12.  
  13. This program just shows a method for doing what the user asked.  It is
  14. by no means an extensive solution.  There is no provision for unselecting
  15. files, for checking to see if a file has already been selected, for using
  16. pointers to save memory in the file arrays, and no provision for sorting the
  17. list of files to accomodate a binary search for purposes of speeding up the
  18. array search.  This is just a simple, 30-minute hack at the idea I mentioned
  19. on CIS.  Just run it, enter a file mask, and you should be able to select
  20. multiple files simply by pressing the <Space> bar on the ones you wish to pick.
  21. The selected files will be shown in a different video attribute than the rest
  22. of the files.  Exit the list by pressing <Esc> or <Enter>.  Once you have
  23. exited, the list of files you have selected will be shown.  Note that once
  24. the files are in the ChosenArr, you may do with them what you wish.
  25.  
  26. No doubt, this program could be turned into a unit that allowed you to call
  27. a function similar to TpDir.GetFileName (maybe call it GetFileNameS) in order
  28. to select multiple file names.  Any number of things could be done.  This
  29. program is just a quickie to show how easy such a task is given the flexibility
  30. of TpPick.  BTW, I hear the OpDir allows this capability, so this little
  31. thing may go the way of the buffalo come Feb.  Oh, well, such is life in the
  32. software lane.
  33.  
  34. That's about all there is to TpLdir.  The source is provided, but keep in mind
  35. that you will need Turbo Professional from TurboPower Software in order to
  36. use TpLdir.
  37.  
  38. This program is distributed as "freeware" and you are under no obligation to
  39. me for using it.  I only ask that you leave my copyright notices in tact and
  40. that if you redistribute this software (either by electronic or other means)
  41. you keep the files here together and do not omit any of them.
  42.  
  43. Happy coding!
  44.  
  45. Ken Henderson
  46.